import { IResponseType } from '@/api/common';
import { ImageCaptchaDTO } from './captcha';
import service from '@/utils/axios';

export const getCaptcha = () => {
    return service<IResponseType<ImageCaptchaDTO>>({
        url: '/captcha/get',
        method: 'get'
    });
};

export const senEmail = (email: string) => {
    return service<IResponseType<void>>({
        url: '/captcha/sendEmail',
        method: 'POST',
        params: {
            email
        }
    });
};
